<c:choose
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:nxu="http://nuxeo.org/nxweb/util">

<c:when test="#{!removeActionOptims}">
  <nxu:set var="contentViewState"
    value="#{contentViewRestActions.getContentViewState(contentView)}"
    cache="true">

    <nxd:restDocumentLink document="#{currentDocument}"
      view="#{widgetProperty_view}" addTabInfo="false"
      newConversation="true" target="_blank"
      styleClass="#{widgetProperty_actionStyleClass} #{widgetProperty_styleClass}">
      <f:param name="contentViewName" value="#{contentView.name}" />
      <f:param name="currentPage" value="0" />
      <f:param name="pageSize" value="0" />
      <f:param name="contentViewState" value="#{contentViewState}" />
      <ui:include src="/incl/action/widgets/action_icon_label_template.xhtml" />
    </nxd:restDocumentLink>

  </nxu:set>
</c:when>

<c:otherwise>
  <nxu:set var="contentViewState"
    value="#{contentViewRestActions.getContentViewState(contentView)}"
    cache="true">

    <nxd:restDocumentLink document="#{currentDocument}"
      view="#{action.properties.view}" addTabInfo="false"
      newConversation="true" target="_blank"
      styleClass="#{actionStyleClass} #{action.properties.styleClass}">
      <f:param name="contentViewName" value="#{contentView.name}" />
      <f:param name="currentPage" value="0" />
      <f:param name="pageSize" value="0" />
      <f:param name="contentViewState" value="#{contentViewState}" />
      <ui:include src="/incl/action/action_icon_label_template.xhtml">
        <ui:param name="hideIcon" value="#{empty action.icon}" />
        <ui:param name="hideLabel" value="#{not empty action.icon}" />
      </ui:include>
    </nxd:restDocumentLink>

  </nxu:set>
</c:otherwise>

</c:choose>